<?php
  session_start();
  date_default_timezone_set('Asia/Kolkata');
  $display_msg = true;

/// File upload settings ///
  $validExtn = array('jpg','jpeg','png','gif');
  $mb = 1;
  $validSize = $mb*1024*1024;//1 MB
/////////////////////////////////////////

  $hostName = 'localhost';
  $username = 'root';
  $password = '';
  $dbName = 'nb158ij';

  mysql_connect($hostName, $username,$password ) or die(mysql_error());

  mysql_select_db($dbName) or die(mysql_error());


function pr($arr=array())
{
  global $display_msg;
  if($display_msg==false)return false;
  echo '<pre  style="background:#000;color:FFF;padding:10px;border-radius:10px;">';
  print_r($arr);
  echo '</pre>';
}

function print_q($arr=array())
{
  global $display_msg;
  if($display_msg==false)return false;

  echo '<div  style="background:yellow;color:red;padding:10px;border-radius:10px;">';
  print_r($arr);
  echo '</div>';
}

function getStatus($status=0)
{
  return $status==0 ? 'Inactive':'Active';
}
